package com.atguigu.client.cmn;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author ybl
 * @version 1.9
 * @date 2021/5/18 14:50
 * 调用客户端服务
 */
@Repository
@FeignClient("service-cmn")// 服务名称
public interface DictFeignClient {

  // 根据dictcode和value查询字典名称
  @GetMapping("/admin/cmn/dict/getName/{dictCode}/{value}")
  String getName(@PathVariable String dictCode, @PathVariable String value);

  // 根据value查询字典名称
  @GetMapping("/admin/cmn/dict/getName/{value}")
  String getName(@PathVariable String value);
}
